Conditions Overview

 

Conditions in thinkingParticles are used to control the command flow of other Operators or Helper objects. For instance, a Distance condition may be used to measure the distance between a particle and an object. Depending on the results of this distance 'condition', an output signal may be created and this might control another operator or further condition.

To access the different Conditions, click on the Conditions icon in the Create rollout for the Dynamic Set you are currently working on.

image180.gif

In many respects, the Conditions can be thought of in the terms of "IF some condition is met, THEN do something else". This classic IF-THEN situation is well known among programmers, and can now be used by artists as well to test their particles to see if something happens.

All of the Conditions have a boolean Output data stream that sends a value of true or false depending on what is being tested (time, distance, collision, threshold, etc.). This output can be used as a trigger for other operators to be turned on, or sent to other tests to further refine your particle behavior.

Example 

image13.jpg

In this example, a Distance Condition (in orange) is being used to find the relative positions of two piped in Node Helpers (Node - Sphere 1 and Node - Sphere 2, both in purple). Depending on how close they are to each other (set in the Distance Condition), the Distance Condition is sending it's boolean Output data stream to the Position Born operator's ON input - effectively turning the particle flow on and off depending on whether or not the two nodes are close enough to one another. Further, the Distance output data stream is being piped into the Position Born's Rate port, so that the flow of particles generated varies depending on how close the objects are.

Read plainly, this set up says that IF the two objects are within a specific distance to one another, THEN turn on the particle creation and control the rate of flow based on the relative distance between the two objects.